{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}YDDL - 编辑文章{% endblock %}

{% block head %}
{{ super() }}
<script src="{{ url_for('static', filename='ckeditor/ckeditor.js') }}"></script>
{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>编辑文章</h1>
</div>
<div class="form">
    <form method="post">
    {{ form.hidden_tag() }}
            <div class="form-group">
            <label for="name">填写文章名</label>
            <input type="text" class="form-control" placeholder="填写文章名" name="form.title">
        </div>
        <div class="form-group">
            <label for="name">填写封面图片url</label>
            <input type="text" class="form-control" placeholder="填写封面图片url" name="form.image">
        </div>
    {{ form.body(class='ckeditor') }}
                <script type="text/javascript">
	               CKEDITOR.replace(
		               "body", {
			               filebrowserUploadUrl: '/ckupload/'
		               }
	               );</script>
    {{ form.submit }}
    </form>
</div>

{% endblock %}

{% block scripts %}
{{ super() }}

{% endblock %}
